/* eslint-disable */
// @ts-ignore
import request from '@/utils/http';

import * as API from './types';

/** 获取对方位置 POST /record/open/userAreaHelp/getLocation */
export async function recordOpenUserAreaHelpGetLocationUsingPost({
  body,
  options,
}: {
  body: API.RecordUserAreaHelpBoRecordOpenUserAreaHelpGetLocation;
  options?: { [key: string]: unknown };
}) {
  return request<API.RLocationVo>('/record/open/userAreaHelp/getLocation', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 我要求助 POST /record/open/userAreaHelp/help */
export async function recordOpenUserAreaHelpHelpUsingPost({
  body,
  options,
}: {
  body: API.RecordUserAreaHelpBoRecordOpenUserAreaHelpHelp;
  options?: { [key: string]: unknown };
}) {
  return request<API.RLong>('/record/open/userAreaHelp/help', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页查询用户自己的我要求助 POST /record/open/userAreaHelp/pageSelf */
export async function recordOpenUserAreaHelpPageSelfUsingPost({
  body,
  options,
}: {
  body: API.RecordUserAreaHelpBoRecordOpenUserAreaHelpPageSelf;
  options?: { [key: string]: unknown };
}) {
  return request<API.RPageDataVoRecordUserAreaHelpVo>(
    '/record/open/userAreaHelp/pageSelf',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 解决报事 POST /record/open/userAreaHelp/solve */
export async function recordOpenUserAreaHelpSolveUsingPost({
  body,
  options,
}: {
  body: API.RecordUserAreaHelpBoRecordOpenUserAreaHelpSolve;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/record/open/userAreaHelp/solve', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 上报位置 POST /record/open/userAreaHelp/upLocation */
export async function recordOpenUserAreaHelpUpLocationUsingPost({
  body,
  options,
}: {
  body: API.RecordUserAreaHelpBoRecordOpenUserAreaHelpUpLocation;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/record/open/userAreaHelp/upLocation', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
